<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qbrush.cpp -->
  <title>QConicalGradient Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QConicalGradient</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QConicalGradient Class</h1>
<!-- $$$QConicalGradient-brief -->
<p>The QConicalGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a conical gradient brush. <a href="#details">More...</a></p>
<!-- @@@QConicalGradient -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QConicalGradient&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qgradient.html">QGradient</a></td></tr></table></div><ul>
<li><a href="qconicalgradient-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#QConicalGradient-2">QConicalGradient</a></b>(qreal <i>cx</i>, qreal <i>cy</i>, qreal <i>angle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#QConicalGradient-1">QConicalGradient</a></b>(const QPointF &amp;<i>center</i>, qreal <i>angle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#QConicalGradient">QConicalGradient</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#angle">angle</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#center">center</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#setAngle">setAngle</a></b>(qreal <i>angle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#setCenter">setCenter</a></b>(const QPointF &amp;<i>center</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qconicalgradient.html#setCenter-1">setCenter</a></b>(qreal <i>x</i>, qreal <i>y</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QConicalGradient-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Conical gradients interpolate interpolate colors counter-clockwise around a center point.</p>
<p class="centerAlign"><img src="images/qconicalgradient.png" alt="" /></p><p>The colors in a gradient is defined using stop points of the <a href="qgradient.html#QGradientStop-typedef">QGradientStop</a> type, i.e&#x2e; a position and a color. Use the <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() or the <a href="qgradient.html#setStops">QGradient::setStops</a>() function to define the stop points. It is the gradient's complete set of stop points that describes how the gradient area should be filled. If no stop points have been specified, a gradient of black at 0 to white at 1 is used.</p>
<p>In addition to the functions inherited from <a href="qgradient.html">QGradient</a>, the QConicalGradient class provides the <a href="qconicalgradient.html#angle">angle</a>() and <a href="qconicalgradient.html#center">center</a>() functions returning the start angle and center of the gradient.</p>
<p>Note that the <a href="qgradient.html#setSpread">setSpread</a>() function has no effect for conical gradients. The reason is that the conical gradient is closed by definition, i.e&#x2e; the conical gradient fills the entire circle from 0 - 360 degrees, while the boundary of a radial or a linear gradient can be specified through its radius or final stop points, respectively.</p>
</div>
<p><b>See also </b><a href="qlineargradient.html">QLinearGradient</a>, <a href="qradialgradient.html">QRadialGradient</a>, and <a href="../qtwidgets/qtwidgets-painting-gradients-example.html">The Gradients Example</a>.</p>
<!-- @@@QConicalGradient -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QConicalGradient$$$QConicalGradientqrealqrealqreal -->
<h3 class="fn" id="QConicalGradient-2"><a name="QConicalGradient-2"></a>QConicalGradient::<span class="name">QConicalGradient</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>cx</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>cy</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>Constructs a conical gradient with the given center (<i>cx</i>, <i>cy</i>), starting the interpolation at the given <i>angle</i>. The angle must be specified in degrees between 0 and 360.</p>
<p><b>See also </b><a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<!-- @@@QConicalGradient -->
<!-- $$$QConicalGradient$$$QConicalGradientconstQPointF&qreal -->
<h3 class="fn" id="QConicalGradient-1"><a name="QConicalGradient-1"></a>QConicalGradient::<span class="name">QConicalGradient</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>center</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>Constructs a conical gradient with the given <i>center</i>, starting the interpolation at the given <i>angle</i>. The <i>angle</i> must be specified in degrees between 0 and 360.</p>
<p><b>See also </b><a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<!-- @@@QConicalGradient -->
<!-- $$$QConicalGradient[overload1]$$$QConicalGradient -->
<h3 class="fn" id="QConicalGradient"><a name="QConicalGradient"></a>QConicalGradient::<span class="name">QConicalGradient</span>()</h3>
<p>Constructs a conical with center at (0, 0) starting the interpolation at angle 0.</p>
<p><b>See also </b><a href="qgradient.html#setColorAt">QGradient::setColorAt</a>(), <a href="qconicalgradient.html#setCenter">setCenter</a>(), and <a href="qconicalgradient.html#setAngle">setAngle</a>().</p>
<!-- @@@QConicalGradient -->
<!-- $$$angle[overload1]$$$angle -->
<h3 class="fn" id="angle"><a name="angle"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QConicalGradient::<span class="name">angle</span>() const</h3>
<p>Returns the start angle of the conical gradient in logical coordinates.</p>
<p><b>See also </b><a href="qconicalgradient.html#setAngle">setAngle</a>() and <a href="qgradient.html#stops">stops</a>().</p>
<!-- @@@angle -->
<!-- $$$center[overload1]$$$center -->
<h3 class="fn" id="center"><a name="center"></a><span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> QConicalGradient::<span class="name">center</span>() const</h3>
<p>Returns the center of the conical gradient in logical coordinates.</p>
<p><b>See also </b><a href="qconicalgradient.html#setCenter">setCenter</a>() and <a href="qgradient.html#stops">stops</a>().</p>
<!-- @@@center -->
<!-- $$$setAngle[overload1]$$$setAngleqreal -->
<h3 class="fn" id="setAngle"><a name="setAngle"></a><span class="type">void</span> QConicalGradient::<span class="name">setAngle</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>Sets <i>angle</i> to be the start angle for this conical gradient in logical coordinates.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qconicalgradient.html#angle">angle</a>().</p>
<!-- @@@setAngle -->
<!-- $$$setCenter[overload1]$$$setCenterconstQPointF& -->
<h3 class="fn" id="setCenter"><a name="setCenter"></a><span class="type">void</span> QConicalGradient::<span class="name">setCenter</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>center</i>)</h3>
<p>Sets the center of this conical gradient in logical coordinates to <i>center</i>.</p>
<p><b>See also </b><a href="qconicalgradient.html#center">center</a>().</p>
<!-- @@@setCenter -->
<!-- $$$setCenter$$$setCenterqrealqreal -->
<h3 class="fn" id="setCenter-1"><a name="setCenter-1"></a><span class="type">void</span> QConicalGradient::<span class="name">setCenter</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>)</h3>
<p>This is an overloaded function.</p>
<p>Sets the center of this conical gradient in logical coordinates to (<i>x</i>, <i>y</i>).</p>
<p><b>See also </b><a href="qconicalgradient.html#center">center</a>().</p>
<!-- @@@setCenter -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
